layui.use('upload', function () {
    var upload = layui.upload;
    //执行实例
    var uploadInst = upload.render({
        elem: '#test1', //绑定元素
        url: ctx+'/common/sysFile/upload', //上传接口
        size: 1000,
        accept: 'file',
        done: function (r) {
            console.log(r)
            if(r.code==0){
                $('#upload-img').html('<img src="'+ctx + r.fileName +'" width="100"/>');
                $('#logo').val(r.fileName);
            }
            layer.msg(r.msg);
        },
        error: function (r) {
            layer.msg(r.msg);
        }
    });
});